<!--河南星辰软件科技有限公司
@copyright Copyright (c) 2010~2022 All rights reserved.
-->
<template>
  <div class='app-container'>
    <el-row>
      <el-col :span='22' :xs='24'>
        <el-menu default-active='active' mode='horizontal' class='menu-unit'>
          <el-menu-item v-for='item in Container2' :index="'供应商详情'===item.name?'active':'default'">
            <el-link @click="gotoMenu(item.url)" :type="'供应商详情'===item.name?'primary':'default'">{{item.page_desc||item.name}}</el-link>
          </el-menu-item>
        </el-menu>
        <table cellpadding="4" cellspacing="0" border="0" width="100%">
          <tr>
            <td class="containerBack">
              <el-form ref="form" :model="message" :rules="rules" label-width="100px" id="mvcfm">
                <el-button @click="gotoPage('/psi/supplychainmana/SupplierProcurement?'+vueparams+'')" type='primary' size="mini"><i class='fa fa-reply'></i>返回</el-button>
                <div class="form-unit">
                  <span class="mvc-title-left"> 主要信息 </span>
                </div>
                <div>
                  <el-row>
                    <el-col :span="24">
                      <el-form-item label="分类" prop="">
                        {{message.client_class}}
                      </el-form-item>
                    </el-col>
                  </el-row>
                  <el-row>
                    <el-col :span="24">
                      <el-form-item label="供应商条形码" prop="">
                        {{message.client_barcode}}
                      </el-form-item>
                    </el-col>
                  </el-row>
                  <el-row>
                    <el-col :span="12">
                      <el-form-item label="供应商类型" prop="">
                        {{message.ctype}}
                      </el-form-item>
                    </el-col>
                  </el-row>
                  <el-row>
                    <el-col :span="12">
                      <el-form-item label="供应商名称" prop="">
                        {{message.client_name}}
                      </el-form-item>
                    </el-col>
                  </el-row>
                  <el-row>
                    <el-col :span="12">
                      <el-form-item label="供应商等级" prop="">
                        {{message.crate}}
                      </el-form-item>
                    </el-col>
                  </el-row>
                  <el-row>
                    <el-col :span="12">
                      <el-form-item label="网站地址" prop="">
                        {{message.client_net}}
                      </el-form-item>
                    </el-col>
                  </el-row>
                  <el-row>
                    <el-col :span="12">
                      <el-form-item label="供应商行业" prop="">
                        {{message.cbus}}
                      </el-form-item>
                    </el-col>
                  </el-row>
                </div>
                <div class="form-unit">
                  <span class="mvc-title-left"> 电话号码 </span>
                </div>
                <div>
                </div>
                <div class="form-unit">
                  <span class="mvc-title-left"> d_client </span>
                </div>
                <div>
                  <el-row>
                    <el-col :span="12">
                      <el-form-item label="备注" prop="">
                        {{message.client_remark}}
                      </el-form-item>
                    </el-col>
                  </el-row>
                </div>
                <el-button @click="gotoPage('/psi/sale/SupplierUp?'+vueparams+'')" type='success' size="mini"><i class='fa fa-edit'></i>修改</el-button>
                <el-button @click="gotoPage('2CB1709D05194080B7E5E97C60257191?'+vueparams+'')" type='primary' size="mini"><i class='fa fa-reply'></i>返回</el-button>
              </el-form>
            </td>
          </tr>
        </table>
      </el-col>
      <el-col :span='2' :xs='24'>
        <el-menu default-active='active' class='menu-unit'>
          <el-menu-item v-for='item in Container'>
            <el-link @click="gotoMenu(item.url)" :type="'供应商'===item.name?'primary':'default'">{{item.page_desc||item.name}}</el-link>
          </el-menu-item>
        </el-menu>
      </el-col>
    </el-row>
  </div>
</template>
<script>
  import request from '@/utils/request'
  export default {
    name: 'SupplierDetProcurment',
    components: {},
    props: ['popparams'],
    data() {
      return {
        vueparams: this.getVUEParams(""),
        message: {
          client_class: null,
          client_barcode: null,
          ctype: null,
          client_name: null,
          crate: null,
          client_net: null,
          cbus: null,
        },
        phones: {
          client_remark: null,
        },
        loading: false,
        Container: null,
        Container2: null,
        rules: {}
      }
    },
    created() {
      this.getData();
      this.loadContainerMenu({
        pid: "821959E4C08E497BA9C4B10D9571712F",
        name: "采购任务右菜单",
        selected: "供应商"
      }, 'Container', this.vueparams);
      this.loadContainerMenu({
        pid: "821959E4C08E497BA9C4B10D9571712F",
        name: "供应商详情",
        selected: "供应商详情"
      }, 'Container2', this.vueparams);
    },
    updated() {},
    mounted() {},
    methods: {
      getData() {
        request({
          method: 'get',
          url: '/xcapi/VUEAction/psi/supplychainmana/ProcureSupplyAction/supplierDetProcurment?' + this.vueparams,
        }).then(data => {
          for (var k in data) {
            if (Array.isArray(data[k])) {
              this[k] = data[k];
            } else {
              $.extend(this[k], data[k]);
            }
          }
        })
      },
    },
  }
</script>
